const mongoose = require('./01-2-mongoose使用流程');

const movieSchema = new mongoose.Schema({
    name:String,
    time:Number,
    score:Number,
    boxOffice:Number,
    type:String
})

const movieModel = mongoose.model('movies',movieSchema);

// 参数1：查找条件
// movieModel.deleteOne({_id:'644735c3f105f1636b5a7d2e'},(err,data)=>{
//     console.log(err);
//     console.log(data);
// })

movieModel.deleteMany({
    name:"让子弹飞"
},(err,data)=>{
    console.log(err);
    console.log(data);
})